OpenBuildings GenerativeComponents Help

Indexing

[ ] or square brackets designate a position within a list. You can then affect one member of a list only by calling out its index. For example,

point1[2]

The first position is [0].

So, point1[2] is the third instance (copy) of point1.

In the following example, the rail cars represent the container for the list, or a list of points or a list of numbers, etc. There are five members in this list.

Lists can contain empty or null containers.

[2] and [3] are null

Lists can be of different types.

Here the type of rail car changes, indicating that you can change the type of the container. So one list for numbers and one list for points.

The great thing about lists is that any other object created based on the listed node is also copied. Of course there are many ways to control this copying and that is where the fun lies.

So for our previous exercise the YTranslation was set to {2,4,6,8,10}, therefore for point1[0], the YTranslation is equal to 2 and for point1[4] it is equal to 10.

You can also declare a variable on-the-fly as a list:

sectionAreas = {A,B,C,D,E}

You can have several dimensions as well: [5][11]